<template>
  <img
    class="avatar-wrapper"
    v-lazy="src" alt=""
    :onerror="`onerror=null;src='https://iyunlang.top/assets/images/avatar4.png'`"
  >
</template>
<script>
export default {
  name: 'Avatar',
  props: {
    src: {
      type: String,
      default: 'https://iyunlang.top/assets/images/avatar4.png'
    }
  }
}
</script>
<style lang="scss" scoped>
  .avatar {
    &-wrapper {
      width: 38px;
      height: 38px;
      border-radius: 4px;
    }
  }
</style>
